package com.zhongyu.scheduler.provider.apiimpl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zhongyu.comm.api.SchedulerApi;
import com.zhongyu.comm.pojo.Scheduler;
import com.zhongyu.scheduler.provider.mapper.SchedulerMapper;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class SchedulerApiImpl implements SchedulerApi {

    @Resource
    private SchedulerMapper schedulerMapper;
    @Override
    public List<Scheduler> findById(Integer id) {
        QueryWrapper<Scheduler> queryWrapper= Wrappers.query();
        queryWrapper.eq("item_id",id);
        return schedulerMapper.selectList(queryWrapper);
    }
}
